<template>
  <div>
    <!-- 导航栏 -->
    <van-nav-bar
      title="注册"
      left-arrow
      @click-left="onClickLeft"
      class="nav"
    />
    <!-- 输入框 -->
    <van-cell-group>
      <van-field v-model="value" placeholder="用户名" />
      <van-field v-model="password" type="password" placeholder="密码" />
      <van-field v-model="password" type="password" placeholder="确认密码" />
    </van-cell-group>
    <!-- 注册按钮 -->
    <van-button
      class="btn"
      type="primary"
      round
      block
      color="#d81e06"
      @click="$router.push('/login')"
    >
      注册
    </van-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      // 默认的表单
      value: "",
      password: "",
    };
  },
  methods: {
    // 这个是按小箭头回退到login
    onClickLeft() {
      this.$router.push("/Login");
    },
  },
};
</script>
<style scoped lang="less">
body {
  background-color: #fff;
  .nav {
    padding-top: 20px;
  }
  .btn {
    width: 90%;
    margin: 150px 18px 0 18px;
  }
}
</style>
